/**
 * Copyright (c) 2010, QinJian
 * All rights reserved.
 */
package com.q.course.entity.classes;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.q.course.entity.category.Category;
import com.q.course.entity.user.BaseEntity;

/**
 * @author 覃健,Email:j411@qq.com
 *
 */
@Entity
@Table( name = "q_classes" )
public class Classes extends BaseEntity {

	@NotNull
	private Long courseId;
	private Category course;
	@NotNull
	private Long placeId;
	private Category place;
	@NotNull
	private Boolean isVIP;
	@NotBlank
	private String className;
	private String remark;
	
	@Column( name="remark" , length=500 )
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Boolean getIsVIP() {
		return isVIP;
	}
	public void setIsVIP(Boolean isVIP) {
		this.isVIP = isVIP;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	@ManyToOne
	@JoinColumn( name="course_id" , insertable = false , updatable = false )
	public Category getCourse() {
		return course;
	}
	public void setCourse(Category course) {
		this.course = course;
	}
	@Column( name="place_id" )
	public Long getPlaceId() {
		return placeId;
	}
	public void setPlaceId(Long placeId) {
		this.placeId = placeId;
	}
	@ManyToOne
	@JoinColumn( name="place_id" , insertable = false , updatable = false )
	public Category getPlace() {
		return place;
	}
	public void setPlace(Category place) {
		this.place = place;
	}
	@Column( name="course_id" )
	public Long getCourseId() {
		return courseId;
	}
	public void setCourseId(Long courseId) {
		this.courseId = courseId;
	}
	
}
